<h1>Listing monitor_entries</h1>

<table id="sortable-list" class="box-table">
  <thead>
	  <tr>
	    <th scope="col">Date (with timezone)</th>
	    <th data-sort="string" scope="col">User UUID</th>
	    <th data-sort="string" scope="col">Log Class</th>
	    <th data-sort="string" scope="col">Status</th>
	    <th data-sort="string" scope="col">Type</th>
	  </tr>
  </thead>

	<tbody>
	<% @monitor_entries.each do |monitor_entry| %>
	  <tr>
	    <td><%= monitor_entry.date + (monitor_entry.time_zone/3600000).hours %><%=monitor_entry.time_zone/3600000%></td>
	    <td><a href="<%= show_user_entries_path %>?user_uuid=<%= monitor_entry.user_uuid %>&days_ago=<%= MonitorEntry.get_user_participation_total_days(monitor_entry.user_uuid)+1 %>&threshold=0"><%= monitor_entry.user_uuid %></a></td>
	    <td>
	    	<%= get_log_class_desc monitor_entry.log_class %>
		</td>
	    <td>
	    	<% if monitor_entry.log_class == MonitorEntry.BATTERY_ENTRY %> 
	    		<%= get_status_desc_for_battery monitor_entry.status %> 
	    	<% elsif monitor_entry.log_class == MonitorEntry.CONNECTIVITY_ENTRY %>
	    		<%= get_status_desc_for_connectivity monitor_entry.status %> 
	    	<% else %>
	    		<%= get_status_desc_for_os monitor_entry.status %> 
	    	<% end %>
    	</td>
    	<td>
	    	<% if monitor_entry.log_class == MonitorEntry.BATTERY_ENTRY %> 
	    		<%= get_type_desc_for_battery monitor_entry.type_ %> 
	    	<% else %>
	    		<%= get_type_desc_for_connectivity monitor_entry.type_ %> 
	    	<% end %>
    	</td>
	  </tr>
	<% end %>
	</tbody>
</table>
<%= paginate @monitor_entries %>

